<?xml version="1.0" encoding="UTF-8"?>
<ui:composition
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
	template="/WEB-INF/templates/business/supplier/template.xhtml"
>

	<f:metadata>		
	   			
		<f:viewParam name="periodType" value="#{assessRecordForSupplierList.periodType}"></f:viewParam>
		<f:viewParam name="periodYear" value="#{assessRecordForSupplierList.periodYear}"></f:viewParam>
		<f:viewParam name="periodSeqNo" value="#{assessRecordForSupplierList.periodSeqNo}"></f:viewParam>		
		
	</f:metadata>

	<ui:define name="supplier_content">

		<h:form id="searchForm">
						
			<div class="iethbox_tit">
				<h2>#{assessRecordForSupplierList.periodType.typeName}</h2>				
			</div>
			
			<div class="iethbox_table">
				<p:dataTable
					value="#{dictForSupplierList.resultList}"
					var="_dict"
					rowIndexVar="_row"
				>
					
					<p:column headerText="序号" width="36" style="text-align: center;">
						<h:outputText value="#{_row + 1}" />
					</p:column>

					<p:column styleClass="blue_c" headerText="提报内容">
						<h:outputText value="#{_dict.title}" />
					</p:column>	
	
					<p:column headerText="状态" style="text-align: center;" width="60" >
						<h:outputText value="已审核" style="color: green"	rendered="#{not empty assessRecordForSupplierList.resultMap[_dict] and assessRecordForSupplierList.resultMap[_dict].recordStatus.name() == 'Keeped'}" />
						<p:link
							outcome="processDiagram.xhtml"
							rendered="#{not empty assessRecordForSupplierList.resultMap[_dict] and assessRecordForSupplierList.resultMap[_dict].recordStatus.name() == 'Initaling'}"
							target="_blank"
							style="text-decoration:underline">
							<f:param
								name="businessKey"
								value="#{assessRecordForSupplierList.resultMap[_dict].id}"></f:param>
							<h:outputText
								value="已提报"
								style="color: blue" />
						</p:link>
						<h:outputText value="审核失败" style="color: red" rendered="#{not empty assessRecordForSupplierList.resultMap[_dict] and assessRecordForSupplierList.resultMap[_dict].recordStatus.name() == 'Deleted'}" />
						<h:outputText value="未提报" style="color: red"	rendered="#{empty assessRecordForSupplierList.resultMap[_dict]}" />
					</p:column>	
					
					<p:column headerText="驳回原因">
						<h:outputText value="#{supplierReviewAssessRecordTaskList.dictTaskMap[_dict.id].processVariables['approvalDesc']}" />
					</p:column>			
	
					<p:column style="text-align: center" width="120">
						<f:facet name="header">操作</f:facet>
						<h:button outcome="report.xhtml" value="提报" styleClass="yellow-int"
							rendered="#{empty assessRecordForSupplierList.resultMap[_dict] or assessRecordForSupplierList.resultMap[_dict].recordStatus.name() != 'Initaling'}">
							<f:param name="dictId" value="#{_dict.id}"></f:param>
							<f:param name="supplierId" value="#{userService.loginedUser.id}" />
							<f:param name="existAssessRecordId" value="#{assessRecordForSupplierList.resultMap[_dict].id}" disable="#{empty assessRecordForSupplierList.resultMap[_dict]}"></f:param>
						</h:button>
												
						<h:button outcome="#{supplierReviewAssessRecordTaskList.dictTaskMap[_dict.id].formKey}" value="修改" styleClass="yellow-int" rendered="#{not empty supplierReviewAssessRecordTaskList.dictTaskMap[_dict.id]}">
							<f:param name="taskId" value="#{supplierReviewAssessRecordTaskList.dictTaskMap[_dict.id].id}"></f:param>							
						</h:button>
					</p:column>
				</p:dataTable>			
			</div>
			
		</h:form>

	</ui:define>
</ui:composition>
